PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Appearance Manager >

Programming With the Appearance Manager


IsThemeInColor

Returns whether the current theme would draw in color in the given environment.

pascal Boolean IsThemeInColor (
                     SInt16 inDepth,
                     Boolean inIsColorDevice);
inDepth
A signed 16-bit integer. Pass a value specifying the bit depth (in bits per pixel) of the current graphics port.
inIsColorDevice
A value of type Boolean . Pass true to indicate that you are drawing on a color device, or false for a monochrome device.
function result
A value of type Boolean . IsThemeInColor returns true if, given the depth and color device information, the theme would draw in color; otherwise, false .
DISCUSSION

To be consistent with the current theme, your application can call the IsThemeInColor function to determine whether or not the Appearance Manager is drawing the theme in color or black and white. If the function returns true , you should draw in color; if it returns false , you should draw in black and white. Note that the Appearance Manager may draw a theme in black and white not only because of the current bit depth or device type, but also because the theme may have defined black-and-white elements, such as the "Black & White" accent color in the platinum appearance.

VERSION NOTES

Available with Appearance Manager 1.0.1 and later.


© 1999 Apple Computer, Inc. – (Last Updated 29 April 99)